package cn.hnucm.serchhbservice.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import lombok.*;
import org.apache.ibatis.javassist.bytecode.analysis.Analyzer;
import org.elasticsearch.index.analysis.Analysis;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.Mapping;

/**
 * <p>
 * 
 * </p>
 *
 * @author zjl
 * @since 2021-12-09
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Document(indexName = "shopping", shards = 3, replicas = 1)
@Mapping(mappingPath = "articlesearch_mapping.json")
@EqualsAndHashCode(callSuper = false)
public class TbHbBasis implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 皇榜id
     */
    @Id
    @TableId(value = "hbId", type = IdType.AUTO)
    private Integer hbId;

    /**
     * 皇榜名称
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    @TableField("hbName")
    private String hbName;

    /**
     * 皇榜报酬
     */
    @Field(type = FieldType.Double)
    @TableField("hbReward")
    private Float hbReward;

    /**
     * 皇榜类型
     */
    @Field(type = FieldType.Keyword, analyzer = "ik_max_word")
    @TableField("hbType")
    private String hbType;

    /**
     * 皇榜简介
     */
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    @TableField("hbIntroduction")
    private String hbIntroduction;

    /**
     * 皇榜发布时间
     */
    @Field(type = FieldType.Text)
    @TableField("hbReleaseDatetime")
    private String hbReleaseDatetime;

    /**
     * 皇榜结束接收时间
     */
    @Field(type = FieldType.Text)
    @TableField("hbReleaseDeadlineDatetime")
    private String hbReleaseDeadlineDatetime;

    /**
     * 皇榜完成时间线
     */
    @Field(type = FieldType.Text)
    @TableField("hbFinishDeadlineDatetime")
    private String hbFinishDeadlineDatetime;

    /**
     * 皇榜发布者
     */
    @Field(type = FieldType.Text)
    @TableField("hbReleaseUserid")
    private Integer hbReleaseUserid;

    /**
     * 图片id
     */
    @Field(type = FieldType.Text, index = false)
    @TableField("hbImagePath")
    private String hbImagePath;

}
